package com.hakim.wfb.customer.params.weixin;

import com.hakim.wfb.customer.enums.TerminalType;
import com.hkfs.fundamental.api.params.SessionParameter;
import org.hibernate.validator.constraints.NotBlank;

/**
 *<p>用户登录参数</p>
 *
 *@author panjingang
 *
 */
public class LoginWeixinUserParameter extends SessionParameter {

	private static final long serialVersionUID = 1L;


	/**
	 * 微信openid
	 */
	@NotBlank(message="请输入微信openid")
	private String openId;
	/**
	 * OS类型
	 */
	private Integer terminalType;


	public void setOpenId(String openId) {
		this.openId=openId;
	}

	public String getOpenId() {
		return openId;
	}

	public void setTerminalType(Integer terminalType) {
		this.terminalType=terminalType;
	}

	public Integer getTerminalType() {
		return terminalType;
	}

	public void putTerminalType(TerminalType _terminalType) {
		if( _terminalType == null ) {
			return;
		}
		this.terminalType= _terminalType.getCode();
	}

	public TerminalType findTerminalType(String terminalType) {
		return TerminalType.getByCode(terminalType);
	}
}